namespace CSharpPro1._1030;

public class Student
{
    private string id;
    private string name;
    private int age;
    private string sex;

    public string Name
    {
        get => name;
        set => name = value ?? throw new ArgumentNullException(nameof(value));
    }

    public int Age
    {
        get => age;
        set => age = value;
    }

    public string Id
    {
        get => id;
        set => id = value;
    }

    public string Sex
    {
        get => sex;
        set => sex = value ?? throw new ArgumentNullException(nameof(value));
    }

    public Student(string id, string name, int age,string sex)
    {
        this.id = id;
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public Student(string name)
    {
        this.name = name;
    }
}